<?
/**
 * class <b>Hli_QuoteResponseType Class</b>
 * Published 21/12/2010 03:45:13
 *
 * This is a simple wrapper extending BookingRequestType functionality to QuoteResponeType.
 * Contains quote response information.
 *
 * @author Gert van Tonder (lars@saucecode.com.au)
 * @copyright sauceCode Pty Ltd.
 * @version 2.0.4.342.
 * @internal It's not recommended at all to modify this code.
 */
class Hli_QuoteResponseType extends Hli_BookingResponseType{
   private $__grossPrice;
   private $__tax;
   private $__netPrice;

   /**
    * Constructor
    */
	public function  __construct(){
		parent::__construct();
      $this->setIsQuote(true); //default to isQuote=true
	}

   public function setResponseObject($value){
		$this->__response=$value;
		$this->setAck($value["Ack"]);
		$this->setHAWB($value["HAWB"]);
      $this->setNetPrice($value["__netPrice"]);
//      $this->setGrossPrice($value["__grossPrice"]);
//      $this->setTax($value["__tax"]);
		$this->setExternalReferenceCode($value["ExternalReferenceCode"]);
		//Loop Through Errors
		if(count($value["ErrorArray"]["Errors"])>0){
			for($c=0;$c<count($value["ErrorArray"]["Errors"]);$c++){
				$err=$value["ErrorArray"]["Errors"][$c];
				$this->addError(new Hli_ErrorType($err["Code"],$err["Message"],$err["Severity"]));
			}
		}
	}

   /**
    * Gets the gross price quote for the item.
    *
    * @return <type> float
    */
   public function getGrossPrice(){
      return $this->__grossPrice;
   }
   /**
    * Sets the gross price quote for the item.
    *
    * @param <type> $grossPrice
    */
   public function setGrossPrice($grossPrice){
      $this->__grossPrice = $grossPrice;
   }

   /**
    * Gets the tax quote for the item.
    *
    * @return <type> float
    */
   public function getTax(){
      return $this->__tax;
   }

   /**
    * Sets the tax quote for the item.
    *
    * @param <type> $tax
    */
   public function setTax($tax){
      $this->__tax = $tax;
   }

   /**
    * Gets the net price quote for the item.
    *
    * @return <type> float
    */
   public function getNetPrice(){
      return $this->__netPrice;
   }

   /**
    * Sets the net price quote for the item.
    *
    * @param <type> $netprice
    */
   public function setNetPrice($netprice){
      $this->__netPrice = $netprice;
   }
}
?>
